package com.payscn.oss.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 *
 * @author Alexander
 */
@ConfigurationProperties(prefix = "oss")
public class OSSProperties {
    private int maxConnections = 100;
    private int connectionTimeout = 5000;
    private int maxErrorRetry = 3;
    private int socketTimeout = 2000;
    private String endpoint = "none";
    private String accessKey = "accessKey";
    private String accessKeySecret = "accessKeySecret";

    public int getMaxConnections() {
        return maxConnections;
    }

    public void setMaxConnections(int maxConnections) {
        this.maxConnections = maxConnections;
    }

    public int getConnectionTimeout() {
        return connectionTimeout;
    }

    public void setConnectionTimeout(int connectionTimeout) {
        this.connectionTimeout = connectionTimeout;
    }

    public int getMaxErrorRetry() {
        return maxErrorRetry;
    }

    public void setMaxErrorRetry(int maxErrorRetry) {
        this.maxErrorRetry = maxErrorRetry;
    }

    public int getSocketTimeout() {
        return socketTimeout;
    }

    public void setSocketTimeout(int socketTimeout) {
        this.socketTimeout = socketTimeout;
    }

    public String getEndpoint() {
        return endpoint;
    }

    public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;
    }

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getAccessKeySecret() {
        return accessKeySecret;
    }

    public void setAccessKeySecret(String accessKeySecret) {
        this.accessKeySecret = accessKeySecret;
    }

    @Override
    public String toString() {
        return "OSSProperties{" + "maxConnections=" + maxConnections + ", connectionTimeout=" + connectionTimeout + ", maxErrorRetry=" + maxErrorRetry + ", socketTimeout=" + socketTimeout + ", endpoint=" + endpoint + ", accessKey=" + accessKey + ", accessKeySecret=" + accessKeySecret + '}';
    }
    
}
